//
//  ZZCRepaymentController.m
//  ZZC-Finance
//
//  Created by mac on 2017/5/24.
//  Copyright © 2017年 mac. All rights reserved.
//

#import "ZZCRepaymentController.h"

@interface ZZCRepaymentController ()
//还款方式
@property (weak, nonatomic) IBOutlet UIButton *repaymentTypeBtn;
@property (weak, nonatomic) IBOutlet UIView *repaymentTypeView;
//还款金额
@property (weak, nonatomic) IBOutlet UITextField *repaymentManyTextField;
@property (strong, nonatomic) ZZCMenuView *menuView;
@end

@implementation ZZCRepaymentController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"还款";
    self.view.backgroundColor = ZZCBGColor;
}
- (IBAction)repaymentTypeClick {
    NSArray *arr = @[@"支付宝",@"微信",@"银行卡"];
    [self.menuView removeFromSuperview];
    self.menuView= [[ZZCMenuView alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(self.repaymentTypeView.frame), ZZCScreenW, 132) contentArray:arr];
    __weak typeof (ZZCMenuView *) weakSelf = self.menuView;
    __weak typeof (self) weakself = self;
    self.menuView.block = ^(BOOL isSeletct ,NSString *title){
        
        [weakSelf removeFromSuperview];
        if (title.length != 0) {
            [weakself.repaymentTypeBtn setTitle:title forState:UIControlStateNormal];
        }
    };
    
    [self.view addSubview:self.menuView];
}

//确定
- (IBAction)certainClick {
    ZZCLog(@"你点击了确认");
}

@end
